#include "thread_pool.hpp"
#include <functional>
#include <iostream> 
using namespace log_module;
void func()
{
    LOG(LOG_LEVEL::INFO) << "this is a task";
}


int main()
{
    auto& pool = thread_pool_module::thread_pool<std::function<void()>>::get_instance();
    pool.start();
    int cnt = 5;
    while(cnt--)
    {
        sleep(1);
        pool.add_task(func);
    }
    pool.stop();
    pool.wait();
    return 0;
}